<extend name="Public/user"/>
<block name="user-right">
<div class="user-right">
	<div class="user-head">
		<h2>{:lang('alipay_chongzhi')}</h2>
	</div>
	<div class="fengenav" style="border-top: none;">{:lang('alipay_writeinfo')}</div>
		<div style="padding: 20px;">
				<form method="post" action="{:url('User/daichongzhi')}">
					<div style="width: 330px;margin: 0 auto;">
					<span style="display: inline-block;width:90px;text-align: right;">{:lang('alipay_name')}：</span><input type="text" name="zhanghao" value=""  placeholder="{:lang('alipay_name')}">
					<div class="blank"></div>
					<span style="display: inline-block;width:90px;text-align: right;">{:lang('alipay_pass')}：</span><input type="password" name="password" value="" placeholder="{:lang('alipay_pass')}">
					<div class="blank"></div>
					<span style="display: inline-block;width:90px;text-align: right;">{:lang('amount')}日元：</span><input type="text" name="amount" value="" placeholder="{:lang('amount')}(RMB)" style="width: 70px;" id="rmbjine"> {:lang('need_to_pay')} <span id="zhuanhuan" style="color:red;font-weight: bold;">0.00</span> {:config('MAIN_COIN')}
					<div class="blank"></div>
					<span style="display: inline-block;width:90px;text-align: right;">{:lang('remark')}：</span><input type="text" name="remark" placeholder="{:lang('remark')}" >
					<div class="blank"></div>
					</div>
					<div style="width: 100px;margin: 0 auto;">
						<input type="hidden" name="zhifuamount" id="zhifuamount">
						<button type="submit" class="btnqd" style="width:100%">{:lang('confirm_submit')}</button>
						<div class="clear"></div>
					</div>
				</form>
			</div>
	<div class="fengenav">{:lang('alipay_record')}</div>
	<ul class="user-i-dingdan">
		<if condition="$list">
			<li>
				<table class="record-list" cellpadding="0" cellspacing="0">
					<tr>
						<th width="100">{:lang('alipay_name')}</th>
						<th width="85">{:lang('recharge_amount')} 日元</th>
						<th width="85">{:lang('pay_amount')} {:config('MAIN_COIN')}</th>
						<th>{:lang('remark')}</th>
						
						<th width="70">{:lang('add_time')}</th>
						<th width="60">{:lang('status')}</th>
					</tr>
					<volist name="list" id="v">
						<tr>
							<td>{$v.zhanghao}</td>
							<td>{$v.amount}</td>
							<td>{$v.zhifuamount}</td>
							<td>{$v.remark}</td>
							<td>{$v.addtime|date="Y-m-d",###}</td>
							<td><eq name="v.status" value="0">{:lang('confirmation')}</eq><eq name="v.status" value="1">{:lang('has_recharge')}</eq><eq name="v.status" value="2">{:lang('not_daozhang')}</eq></td>
						</tr>
					</volist>
				</table>
				<div class="page">{$_page}</div>
			</li>
			<else />	
			<li class="kong">
				<span style="color:#999;">{:lang('no_alipay_chongzhi')}</span>

			</li>
		</if>
	</ul>
	<div class="blank"></div>
</div>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
<script type="text/javascript" src="http://lgs821.qiniudn.com/jquery-ui/jquery-ui.js"></script>
<script type="text/javascript">
	$(function(){
		$('#rmbjine').blur(function(){
			var rmb=$(this).val();
			var mb=rmb/{:config('MAIN_HUILV')};
			mb=mb.toFixed(2);
			$('#zhuanhuan').html(mb);
			$('#zhifuamount').val(mb);
		})

		$('form').submit(function(){
			var self = $(this);
				$.post(self.attr("action"), self.serialize(), success, "json");
				return false;
				function success(data){
					if (data.status) {
						$.thinkbox.success(data.info);
						setTimeout('location.reload()',1500);
					}else{
						$.thinkbox.error(data.info);
					};
				}
		})
	})
</script>
</block>